<#assign contextPath = request.contextPath/>
<#if parameters.searchFormId?exists>
</#if>
<#if pageComponent?exists>
<div id="grid-page-toolbar" cellspacing="0" cellpadding="0" class="grid-bottom-toolbar">
<div class="display-text">显示 <span class="record-start">${pageComponent.startPoint?c}</span> -
<span class="record-end">${pageComponent.endPoint?c}</span>条，共 <span class="record-amount">${pageComponent.totalCount?c}</span>
条</div>
<div class="page-navigator">
<table cellspacing="0" cellpadding="0" border="0">
	<tbody>
		<tr align="center">
			<td width="18">
			<#if pageComponent.currentPageNo gt 1>
			<a href="${pageComponent.firstPageUrl}"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-first.gif"></a>
			<#else>
			<a href="javascript:void(0);"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-first-disabled.gif"></a>
			</#if>
			</td>
			<td width="18">
			<#if pageComponent.hasPreviousPage=="Y">
			<a href="${pageComponent.prePageUrl}"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-prev.gif"></a>
			<#else>
			<a href="javascript:void(0);"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-prev-disabled.gif"></a>
			</#if>
			</td>
			<td width="18">
			<#if pageComponent.hasNextPage=="Y">
			<a href="${pageComponent.nextPageUrl}"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-next.gif"></a>
			<#else>
			<a href="javascript:void(0);"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-next-disabled.gif"></a>
			</#if>
			</td>
			<td width="18">
			<#if pageComponent.currentPageNo lt pageComponent.totalPageCount>
			<a href="${pageComponent.lastPageUrl}"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-last.gif"></a>
			<#else>
			<a href="javascript:void(0);"><img src="<%=request.getContextPath() %>/images/ico16/ico-page-last-disabled.gif"></a>
			</#if>
			</td>
			<td width="10" class="page-seperator">|</td>
			<td width="48">页码：</td>
			<td width="20"><input type="text" value="${pageComponent.currentPageNo?c}" onblur="pageNoInputOnBlur(this.value);" onfocus="pageNoInputOnFocus(this.value);" id="page-number" class="page-number"></td>
			<td width="10">/</td>
			<td width="15"><span class="total-page-size">${pageComponent.totalPageCount?c}</span></td>
			<td width="50">
			<div class="grid-btn-order" onclick="redirctTo()">
			<ul>
				<li class="left-normal"></li>
				<li class="middle-normal">跳到</li>
				<li class="right-normal"></li>
			</ul>
			</div>
			</td>
		</tr>
	</tbody>
</table>
</div>
</div>
<script type="text/javascript">
var origPageNo = ${pageComponent.currentPageNo?c};
function redirctTo(){
  var inputPageNo = $("#page-number").val();
  if( inputPageNo == ${pageComponent.currentPageNo?c})return;
  window.location.href = "${pageComponent.noPageNoPageUrl}"+inputPageNo;
  
}

function pageNoInputOnBlur(value){
   if(value<1 || value>${pageComponent.totalPageCount?c}){
      $("#page-number").val(origPageNo);
      return;
   }
}

function pageNoInputOnFocus(value){
   origPageNo = value;
}

window.onload = function(){
   //var $pageBar = $("#grid-page-toolbar");
   
};

</script>
</#if>